from PySide6.QtWidgets import QDialog,QMessageBox
from views.issuedmange.sureissuedperson.addissuedamount.addallamount import Ui_addallamount

class AddAllAmountView(QDialog,Ui_addallamount):
    def __init__(self):
        super().__init__()
        self.setupUi(self)
        self.amount = 0

        self.addallamountbtn.clicked.connect(self.addallamountFun)

    def addallamountFun(self):
        allamount = float(self.allamount.text().strip())

        if allamount !=0:
            self.amount = allamount
            self.accept()
        else:
            QMessageBox.critical(None,'失败','发放工资不能为0！')
